/*
 * Created on 2007-8-26
 *
 * TODO To change the template for this generated file go to
 * Window - Preferences - Java - Code Style - Code Templates
 */
package com.tongji.quickCRUDQ.html;

import com.tongji.quickCRUDQ.define.Column;

/**
 * @author Administrator
 *
 * TODO To change the template for this generated type comment go to
 * Window - Preferences - Java - Code Style - Code Templates
 */
public class Box implements Control {

	private Object dynamic;
	/* (non-Javadoc)
	 * @see com.tongji.quickCRUDQ.html.Control#setDynamic(java.lang.Object)
	 */
	public void setDynamic(Object dynamic) {
		this.dynamic=dynamic;
	}
	/* (non-Javadoc)
	 * @see com.tongji.quickCRUDQ.html.Control#formatHtml(java.lang.String, boolean)
	 */
	public String formatTableHtml(String value, Column column) {
		return value;

	}

	/* (non-Javadoc)
	 * @see com.tongji.quickCRUDQ.html.Control#formatDetailHtml(java.lang.String)
	 */
	public String formatDetailHtml(String value, Column column) {
		StringBuffer html=new StringBuffer();
		html.append("<input type='checkbox' name=\"").append(column.getColumnname())
		    .append("\"").append(" bnull=\"").append(column.getBnull()).append("\" ");
		if(value.equals("Y")) html.append(" checked ");
		if(column.getBupdate().equals("N")) html.append(" disabled ");
		html.append(">");
		return html.toString();
	}
	/* (non-Javadoc)
	 * @see com.tongji.quickCRUDQ.html.Control#setStyleClass(java.lang.String)
	 */
	public void setStyleClass(String value) {
		// TODO Auto-generated method stub

	}
}
